//导入路由
import VueRouter from 'vue-router'
//导入路由组件
import Login from './components/login.vue'
import Home from './components/tabbar/home.vue'
import Member from './components/tabbar/member.vue'
import Shopcar from './components/tabbar/shopcar.vue'
import Search from './components/tabbar/search.vue'
import Detail from './components/detail.vue'
import NewsInformation from './components/newsInformation.vue'
import NewDetail from './components/newDetail.vue'


//配置路由
var router = new VueRouter({
    routes: [
       {path:'/',redirect:'/login'},
       {path:'/login',component:Login},
       {path:'/home',component:Home},
       {path:'/member',component:Member},
       {path:'/shopcar',component:Shopcar},
       {path:'/search',component:Search},
       {path:'/home/detail',component:Detail},
       {path:'/home/newsInformation',component:NewsInformation},
       {path:'/home/newsInformation/newDetail/:id',component:NewDetail}
    ],
    linkActiveClass:'mui-active'//覆盖默认的路由高亮的类
})

//将路由信息导出
export default router;